//
//  MyCell.m
//  table
//
//  Created by mac on 15/3/17.
//  Copyright (c) 2015年 xuanrui. All rights reserved.
//

#import "MyCell.h"
#define  SCREENWIDTH [UIScreen mainScreen].bounds.size.width
#define  SCREENHEIGHT [UIScreen mainScreen].bounds.size.height
#define applicationWidth [UIScreen mainScreen].applicationFrame.size.width
#define applicationHeight [UIScreen mainScreen].applicationFrame.size.height
#define widthRate [UIScreen mainScreen].applicationFrame.size.width/320.0f

@implementation MyCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //背景灰
        _myImageView7 = [[UIImageView alloc] init];
        _myImageView7.frame = CGRectMake(0, 0,   [UIScreen mainScreen].bounds.size.width, 100 * widthRate);
        [self addSubview:_myImageView7];
        //背景白
        _myImageView6 = [[UIImageView alloc] init];
        _myImageView6.frame = CGRectMake(10, 4, applicationWidth-20, (applicationWidth - 10 * widthRate * 2 - 12 * widthRate * 3)/4 + 24 * widthRate);
        [self addSubview:_myImageView6];
        
        //大图片
        _myImageView = [[UIImageView alloc] init];
        _myImageView.frame = CGRectMake(18, 5 * widthRate+5, applicationWidth/4, applicationWidth/4);
        [self addSubview:_myImageView];
        //第一小图
        _myImageView1 = [[UIImageView alloc] init];
        _myImageView1.frame = CGRectMake(SCREENWIDTH/10*3.5,SCREENWIDTH/40*7, SCREENWIDTH/10, SCREENWIDTH/10);
        [self addSubview:_myImageView1];
        //第二小图
        _myImageView2 = [[UIImageView alloc] init];
        _myImageView2.frame = CGRectMake((SCREENWIDTH/10*3.5)+(SCREENWIDTH/10)+5, SCREENWIDTH/40*7, SCREENWIDTH/10, SCREENWIDTH/10);
        [self addSubview:_myImageView2];
        //第三小图
        _myImageView3 = [[UIImageView alloc] init];
        _myImageView3.frame = CGRectMake((SCREENWIDTH/10*3.5)+((SCREENWIDTH/10)+5)*2, SCREENWIDTH/40*7, SCREENWIDTH/10, SCREENWIDTH/10);
        [self addSubview:_myImageView3];
        //第四小图
        _myImage = [[UIImageView alloc] init];
        _myImage.frame = CGRectMake((SCREENWIDTH/10*3.5)+((SCREENWIDTH/10)+5)*3, SCREENWIDTH/40*7, SCREENWIDTH/10, SCREENWIDTH/10);
        [self addSubview:_myImage];
        //第五小图
        _myImageView5 = [[UIImageView alloc] init];
        _myImageView5.frame = CGRectMake((SCREENWIDTH/10*3.5)+((SCREENWIDTH/10)+5)*4, SCREENWIDTH/40*7, SCREENWIDTH/10, SCREENWIDTH/10);
        [self addSubview:_myImageView5];
        
        _myLabel = [[UILabel alloc] init];
        _myLabel.frame = CGRectMake(SCREENWIDTH/10*3.5, 5 * widthRate, SCREENWIDTH/4*3, 30);
        [self addSubview:_myLabel];
        
        _myLabel1 = [[UILabel alloc] init];
        _myLabel1.frame = CGRectMake(SCREENWIDTH/10*3.5, 30 * widthRate, SCREENWIDTH/8*5, 20);
        [self addSubview:_myLabel1];
        
        
                
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
